import {
    request
} from "./index";

/** modules begin */
const infoModule = 'couponInfo/'; // 管理优惠券活动模块
const customerModule = 'couponCustomer/'; // 会员优惠券模块
/** modules end */

/** infoModule begin */
// 获取优惠券列表
export const queryCouponList = (data) => {
    return request(infoModule + 'mayReceiveCouponList', data);
}
/** infoModule end */

/** customerModule begin */
// 删除
export const deleteCoupon = (data) => {
    return request(customerModule + 'delete', data);
}

// 获取可用优惠券
export const queryCanUseCouponList = (data) => {
    return request(customerModule + 'canUseCouponList', data);
}

// 获取我的优惠券列表
export const queryMyCouponList = (data) => {
    return request(customerModule + 'couponMyList', data);
}

// 获取优惠券详情
export const queryCouponDetail = (data) => {
    return request(customerModule + 'queryDetails', data);
}

// 领取优惠券
export const recevieCoupon = (data) => {
    return request(customerModule + 'couponReceive', data);
}

// 新增
export const updateCoupon = (data) => {
    return request(customerModule + 'save', data);
}

// 获取优惠券详情
export const couponInfoDetails = (data) => {
    return request(infoModule + 'couponInfoDetails', data);
}
/** customerModule end */